package com.hhxyjsj.factory.simple;

import com.hhxyjsj.factory.Dell;
import com.hhxyjsj.factory.INotebook;
import com.hhxyjsj.factory.Lenovo;

/**
 * 工厂类
 * 
 * @author Puhui
 *
 */
public class INotebookFactory {

	public static INotebook getInstance(String name){
		if("dell".equalsIgnoreCase(name)){
			return new Dell();
		}else if("lenovo".equalsIgnoreCase(name)){
			return new Lenovo();
		}
		throw new RuntimeException(name + "没有对应的生产厂商!");
	}
}
